import React from 'react';
import { Spin } from 'antd';
import { formatNumber, messages } from "share/common";
import 'styles/data-center/report/travel-report/fee-report/fee-report-overview.scss';

class ReportOverview extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      reportDetailTotalLoading: true,
      reportDetailTotal: {}
    };
  }

  render() {
    const {
      reportDetailTotalLoading,
      reportDetailTotal,//报表数据 总金额，总人数，平均金额
    } = this.props;
    return (
      <div className="fee-report-overview">
        <Spin spinning={reportDetailTotalLoading}>
          <div className="echarts-overview">
            <div className="echart-card-wrap total-amount">
              <div className="echart-card">
                <span className="echart-card-title">{messages('data-center.key70')/*总报销金额*/}</span>
                <span className="echart-card-number">
                {reportDetailTotal.baseAmount ? formatNumber(reportDetailTotal.baseAmount) : 0}
              </span>
              </div>
            </div>
            <div className='clear'/>
          </div>

        </Spin>
      </div>
    );
  }
}

ReportOverview.propTypes = {
  reportDetailTotalLoading: React.PropTypes.bool,
  reportDetailTotal: React.PropTypes.obj
};

ReportOverview.defaultProps = {};

export default ReportOverview;



